package com.atguigu.hbase;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.client.Connection;
import org.apache.hadoop.hbase.client.ConnectionFactory;

import java.io.IOException;

public class ConnectionTest {
    public static void testConnection() throws IOException {
        Configuration configuration = new Configuration();
        configuration.set("hbase.zookeeper.quorum" , "hadoop102,hadoop103,hadoop104");
        Connection connection = ConnectionFactory.createConnection(configuration);

        System.out.println("同步连接：" + connection);
        connection.close();
    }

    public static void main(String[] args) throws IOException {
        testConnection();
    }
}
